#include <avr/interrupt.h>
#include "timer.h"
void timerInit(void)
{
	
	
	// set timer0 counter initial value to 0
	TCNT0=0x00;
	// start timer0 with /1024 prescaler 
	//pg 74 clear timer on compare match
	TCCR0 = (1<<CS02) | (1<<CS00) | (1<<WGM01);
	
	OCR0 = 255; //setting max value for testing
	
	// enable timer compare match interrupt
	TIMSK = (1<<OCIE0);
}